<template>
    <div class="desc-container">
        <p class="desc-title">{{descinfo.title}}</p>
        <hr>
        <!-- 商品内容区域 -->
        <div class="content" v-html="descinfo.content" ></div>
    </div>
</template>
<script>
import {Toast} from 'mint-ui'
export default {
    data(){
        return{
            descinfo:{},
            id:this.$route.params.id
        }

    },
    created(){
        this.getinfo()
    },
    methods:{
        getinfo(){
        this.$http.get('api/goods/getdesc/'+this.id).then(result=>{
            if(result.body.status==0){
                this.descinfo=result.body.message[0];
            }else{
                Toast('商品详情加载失败')
            }
        })
        }
    }
}
</script>
<style lang="scss">
.desc-container{
    padding: 4px;
.desc-title{
    color: #26a2ff;
    text-align: center;
    font-size: 16px;
    margin: 15px 0;
}
.content{
    img{
         width: 100%;
    }   
}
}
</style>
